import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { AppInstanceService } from './services/app-instance.service';
import * as fs from 'fs';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  // Set app instance
  const appInstanceService = app.get(AppInstanceService);
  appInstanceService.setApp(app);
  await app.listen(4000);

  // for (let i = 0; i < 999000; i++) {
  //   // 追加内容
  //   fs.appendFileSync(`./test.txt`, `${i}_`);
  // }
}
bootstrap();